#include "User.h"

using namespace std;

// 构造函数
User::User(int id, const string& username, const string& password_hash, Role role)
    : id(id), username(username), password_hash(password_hash), role(role) {}

// 获取用户ID
int User::getId() const {
    return id;
}

// 获取用户名
const string& User::getUsername() const {
    return username;
}

// 获取密码哈希
const string& User::getPasswordHash() const {
    return password_hash;
}

// 获取用户角色
User::Role User::getRole() const {
    return role;
}

void User::setRole(Role role) {
    this->role = role;
}
